package com.zz.hhbl.entity

import android.os.Parcelable
import com.amap.api.maps.model.LatLng
import com.zz.framework.core.ext.getDouble
import com.zz.hhbl.R
import kotlinx.android.parcel.Parcelize

/**
 * Copyright © 2025 zhun All rights reserved.
 * Created by ZhaoZhun on 2025/3/7 14:22.
 * @author: ZhaoZhun 1820022519@qq.com
 * @version: V1.0
 */
@Parcelize
data class SpotPointEntity(
    val remark: String?,
    val id: Long,
    val spotId: Long,
    val name: String?,
    val type: String?, //01 景点 02 卫生间 03 商铺  04 停车场  05 游客中心  06 景区大门
    val lon: String?,
    val lat: String?,
) : Parcelable {
    fun getLatLng(): LatLng {
        return LatLng(lat.getDouble(), lon.getDouble())
    }

    fun getIconRes() : Int{
       return when (type) {
            "01" -> R.drawable.vector_marker_spot
            "02" -> R.drawable.vector_marker_wc
            "03" -> R.drawable.vector_marker_store
            "04" -> R.drawable.vector_marker_park
            "05" -> R.drawable.vector_marker_tourist_center
            "06" -> R.drawable.vector_marker_gate
            else -> R.drawable.vector_marker_spot
        }
    }
}
